<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="../common.inc" %>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="./css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="./js/form.js"></script>
<script type="text/javascript" language="javascript">
<!--
	function submitSelect(){
		var userIds = "";
		var userNames = "";
		var objs = document.getElementsByName('id');
		for(var i = 0; i < objs.length; i++){
			if(objs[i].value != '0' && objs[i].checked){
				var tStr = (objs[i].value).split(",");
				if(tStr[0] != "" && tStr[1] != ""){
					userIds += tStr[0] + ",";
					userNames += tStr[1] + ",";
				}
			}
		}
		
		if(userIds != "" && userNames != ""){
			window.returnValue = userIds + "##" + userNames;
			self.close();
		}else{
			alert("请选择收件人！");
		}
	}
-->
</script>
</head>
<body style="margin: 10px 5px 0 5px;">
	<table class="table_input">
		<tr>
			<td align="right">
				<input class="btn1" type="button" value="<fmt:message key='common.button.ok2'/>" onclick="submitSelect()"/>&nbsp;&nbsp;
				<input class="btn1" type="button" value="<fmt:message key='common.button.cancel2'/>" onclick="window.close();"/>&nbsp;&nbsp;
			</td>
		</tr>
	</table>

	<table id="tDept" class="table_style" style="text-align: center;">
		<tr>
			<td class="title4" width="15%"><input id="id" name="id" type="checkbox" value="0" onclick="checkAll('id')"/></td>
			<td class="title4"><fmt:message key='employee.lable.name'/></td>
			<td class="title4"><fmt:message key='customer.lable.byDept'/></td>
		</tr>
		<c:forEach var="user" items="${users}">
		<tr>
			<td><input id="id" name="id" type="checkbox" value="${user.id},${user.userName}"/></td>
			<td>${user.userName}</td>
			<td>${user.deptName}</td>
		</tr>
		</c:forEach>
	</table>
</body>
</html>